﻿using System.Windows;

namespace SPW.GenericDesktop.Views
{
    /// <summary>
    /// Interaction logic for SkylineWindow.xaml
    /// </summary>
    public partial class SkylineWindow : Window
    {
        private AxTerraExplorerX.AxTE3DWindow axTE3DWindow;

        public SkylineWindow()
        {
            InitializeComponent();
        }

        public SkylineWindow(Window _owner)
            : this()
        {
            //设置窗口所有者
            this.Owner = _owner;
        }

        private void InitSkylineViewer()
        {
            axTE3DWindow = new AxTerraExplorerX.AxTE3DWindow();
            axTE3DWindow.BeginInit();
            OCXControl.Child = axTE3DWindow;
            axTE3DWindow.EndInit();
            axTE3DWindow.BorderStyle = 0;
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            InitSkylineViewer();
        }
    }
}
